<?php
/**
 * Copyright 2011  SURFfoundation
 * 
 * This file is part of ESCAPE.
 * 
 * ESCAPE is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ESCAPE is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ESCAPE.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * For more information:
 * http://escapesurf.wordpress.com/
 * http://www.surffoundation.nl/
 * 
 * Contact: d.vierkant@utwente.nl
 * 
 * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3
 */
?>
<?php $this->displayHeader(); ?>

<?php
$pid = $this->requestAttributes['pid'];
$dsId = $this->requestAttributes['dsId'];
$dsContent = $this->requestAttributes['dsContent'];
$updateComplete = $this->requestAttributes['updateComplete'];
?>

<p>
Editing PID: <strong><?php print htmlspecialchars($pid); ?></strong> DS ID: <strong><?php print htmlspecialchars($dsId); ?></strong>
</p>

<form method="post" action="/setup/EditFedoraDataStream">
<input type="hidden" name="pid" value="<?php print htmlspecialchars($pid); ?>" />
<input type="hidden" name="dsId" value="<?php print htmlspecialchars($dsId); ?>" />
<textarea rows="20" cols="100" name="dsContent"><?php print htmlspecialchars($dsContent); ?></textarea>
<br />
<input type="submit" name="save" value="Save" />
<input type="button" value="Cancel" onclick="window.location.href='/setup/EditFedoraDataStream?pid=<?php print rawurlencode($pid)?>&amp;dsId=<?php print rawurlencode($dsId)?>'; return false" />
</form>

<?php
if($updateComplete) 
{
?>
<p><em>Update successful</em></p>
<?php
}
?>

<?php $this->displayFooter(); ?>